<template>
	<view class="profit">
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">收益详情</block>
		</cu-custom>			
		<view class="item">
			<view>佣金金额</view>
			<view class="text-price text-bold text-red text-df">{{ Info.reward }}</view>
		</view>
		<view class="item">
			<view>类型</view>
			<view>{{ Info.class_type }}</view>
		</view>				
		<view class="item">
			<view>时间</view>
			<view>{{ Info.createtime }}</view>
		</view>	
		<view class="item">
			<view>交易单号</view>
			<view>{{ Info.batchcode }}</view>
		</view>	
		<view class="item">
			<view>买家</view>
			<view>{{ Info.weixin_name || Info.name || '' }}</view>
		</view>	
		<view class="item">
			<view>状态</view>
			<view>{{ Info.paytype }}</view>
		</view>
		<view class="item">
			<view>备注</view>
			<view>{{ Info.remark }}</view>
		</view>
	</view>
</template>

<script>
	import { profitDetail } from '@/common/api/lbt'
	export default{
		name :'profitDetail',
		computed: {},
		data () {
			return {
				Info:{},
			}
		},
		onLoad(options) {
			let { batchcode, id } = options
			this.getInfo(batchcode, id)
		},
		methods: {
			getInfo(batchcode, id) {
				uni.showLoading()
				profitDetail({ batchcode, id }).then(res => {
					uni.hideLoading()
					res.reward = this.utils.Fxied(res.reward)
					this.Info = res
				}) 
			}
		},
		
	}
</script>

<style lang="less">
	@import '../../common/styles/variables.less'; 	
	.profit{
		.item {
			height: @height;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background-color: white;
			padding: 0 15upx;
			& > view {
				&:first-of-type {
					width: 110upx;
					text-align: justify;
					text-align-last: justify;					
				}
			}
			&:not(:last-of-type) {
				.border-bottom(15upx)
			}
			&:nth-of-type(1) {
				margin-bottom: 15upx;
				&::after {
					display: none;
				}
			}
		}		
	}
	
</style>
